#include "SyncManager.h"
#include <OgreLogManager.h>
#include <OgreStringConverter.h>

using namespace Ogre;

template<> CSyncManager* Singleton<CSyncManager>::ms_Singleton = NULL;

CSyncManager* CSyncManager::getSingletonPtr(void)
{
    return ms_Singleton;
}

CSyncManager& CSyncManager::getSingleton(void)
{
    assert( ms_Singleton );  return ( *ms_Singleton );
}

CSyncManager::CSyncManager(bool isServer) : m_MovieFrame(0), m_IsServer(isServer), m_Reset(false), m_currentCamera(NULL), m_IsPlayingMovie(false)
{
	memset(m_moviesFrame, 0, MAX_MOVIE * sizeof(int));

	htMutexInit(&m_updateMutex);
}

CSyncManager::~CSyncManager(void)
{
}

void CSyncManager :: setTime(OMTimer &timer)
{
	m_Timer.setTime(timer.getMilliseconds());
}

